import numpy as np
a=np.random.randint(1,10,size=(3,3))
print('随机生成的二维整数数组a1:\n',a1)
a2=np.random.randint(1,10,size=3)
print('随机生成的一维整数数组a2:\n',a2)
a3=np.random.rand(3,3)*10
print('随机生成的二维小数数组a3:\n',a3)
print('a1与a2相加:\n',np.add(a1,a2))
print('a1与a3相乘:\n',np.multiply(a1,a3))
print('以a1为底数,a2为指数的幂:\n',np.power(a1,a2,dtype='int64'))
print('a1的倒数:\n',np.reciprocal(a1,dtype='float'))
print('a3四舍五入,小数点后保留一位:\n',np.around(a3,decimals=1))
print('a1的余弦值:\n',np.cos(a1*np.pi/180))